package com.kakaxi.mybilibili.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.kakaxi.mybilibili.R;
import com.kakaxi.mybilibili.bean.LiveRoomGiftTopItemBean;

import java.util.List;

/**
 * 礼物排行榜列表适配器lei
 * Created by kakaxi on 16/11/8.
 */

public class LiveRoomGiftTopRecyAdapter extends BaseQuickAdapter<LiveRoomGiftTopItemBean,
        BaseViewHolder> {


    public LiveRoomGiftTopRecyAdapter(List<LiveRoomGiftTopItemBean> data) {
        super(R.layout.item_recy_live_room_gift_top, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, LiveRoomGiftTopItemBean
            liveRoomGiftTopItemBean) {
        baseViewHolder.setText(R.id.txt_live_room_gift_top_no, baseViewHolder.getAdapterPosition
                () + 1 + "")
                .setText(R.id.txt_live_room_gift_top_name, liveRoomGiftTopItemBean.getUname())
                .setText(R.id.txt_live_room_gift_top_num, liveRoomGiftTopItemBean.getCoin() + "");
    }
}
